# -*- coding: utf-8 -*-
from collections import namedtuple, Counter, defaultdict, deque

#用元组不能看出是坐标，用class又太小题大做
Point = namedtuple('Point', ['x','y'])
p = Point(1,2)
print p.x
#p.x = 3 #元组不可改变元素

s = '''A Counter is a dict subclass for counting hashable objects. It is an unordered collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The Counter class is similar to bags or multisets in other languages.'''.lower()
c = Counter(s)
print c.most_common(5)
#print c.elements()

score = defaultdict(lambda: 0)
print score['math']